package icon;

import javax.swing.*;
import java.awt.*;

public class MyFrame5 extends JFrame {
        public MyFrame5(String title){
            super(title);

            //直接显示图片，不经过panel
//            PictureView pictureView = new PictureView();
//            this.setContentPane(pictureView);
//            pictureView.setBackgroundColor(Color.LIGHT_GRAY);
//            pictureView.setImagePath("Java-swing/data/维修.png");



            JPanel root = new JPanel();
            this.setContentPane(root);

            PictureView c= new PictureView();
            root.add(c);

            c.setImagePath("Java-swing/data/维修.png");
            c.setPreferredSize(new Dimension(64,64));

        }
}
